//
//  ForgerPassViewController.swift
//  FFF
//
//  Created by 郑东喜 on 2016/11/28.
//  Copyright © 2016年 郑东喜. All rights reserved.
//

import UIKit

class ForgerPassViewController: UIViewController,ForgetViewDelegate {

    //视图即将开始，回复导航栏设置
    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        //隐藏导航栏
        self.navigationController?.navigationBar.isHidden = false
        
        //设置导航栏背景颜色透明
        UIApplication.shared.statusBarStyle = UIStatusBarStyle.default
    }

    
    var v = ForgetView()
    
    override func viewDidLoad() {
        super.viewDidLoad()
        //标题
        self.navigationItem.title = "忘记密码"

        // Do any additional setup after loading the view.
        view.backgroundColor = UIColor.init(red: 229.0/255.0, green: 229.0/255/0, blue: 229.0/255.0, alpha: 1.0)
        
        //设置视图
        setView()
    }
    
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        
        self.navigationController!.popToRootViewController(animated: true)
    }


}

extension ForgerPassViewController {
    func setView() -> Void {
        v.frame = CGRect(x: 0, y: 64, width: SW, height: SH - 64)
        v.delegate = self
        view.addSubview(v)
    }
}


// MARK:- 接收代理
extension ForgerPassViewController {
    func findPassSuccess() {
        print("接收信息")
        self.navigationController!.popToRootViewController(animated: true)
    }
}
